package com.kai.awt.layoutmanager;

import java.awt.*;

/**
 * @Author Mr.Yan
 * @create 2022/3/19 20:34
 * @description: BorderLayout
 */
public class Demo4 {
    public static void main(String[] args) {
        Frame frame = new Frame("test4");

        frame.setLayout(new BorderLayout());

        frame.add(new Button("11"),BorderLayout.SOUTH);
        frame.add(new Button("11"),BorderLayout.NORTH);
        frame.add(new Button("11"),BorderLayout.EAST);
        frame.add(new Button("11"),BorderLayout.WEST);

        Panel panel = new Panel();
        panel.add(new Button("11"));
        panel.add(new TextArea("测试"));
        frame.add(panel);

        frame.pack();
        frame.setVisible(true);
    }
}
